/* GUI CONVERTED from rcrp09.p (converter v1.76) Fri May  3 13:21:51 2002 */
/* rcrp09.p - Release Management Customer Schedules                     */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/* $Revision: 1.5.1.3 $                                                     */
/*V8:ConvertMode=FullGUIReport                                          */
/* REVISION: 7.3    LAST MODIFIED: 10/06/92           BY: WUG *G462*    */
/* REVISION: 7.3    LAST MODIFIED: 07/15/94           BY: WUG *GK76*    */
/* REVISION: 7.3    LAST MODIFIED: 07/23/96           BY: *G29C* Ajit Deodhar */
/* REVISION: 8.6    LAST MODIFIED: 10/07/97           BY: bvm *K0KW*    */

/* REVISION: 8.6E     LAST MODIFIED: 02/23/98   BY: *L007* A. Rahane          */
/* REVISION: 8.6E     LAST MODIFIED: 10/04/98   BY: *J314* Alfred Tan         */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00   BY: *N08T* Annasaheb Rahane   */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00   BY: *N0KP* myb                */
/* Old ECO marker removed, but no ECO header exists *F0PN*                    */
/* $Revision: 1.5.1.3 $    BY: Katie Hilbert         DATE: 04/15/02  ECO: *P03J*  */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

/* INTRADAY SHIPPING REPORT */


/*GUI global preprocessor directive settings */
&GLOBAL-DEFINE PP_PGM_RP TRUE
&GLOBAL-DEFINE PP_ENV_GUI TRUE


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

{mfdtitle.i "2+ "}
{rcrpvar.i "new shared"}

define new shared variable due_dt  as date label "Due Date" no-undo.
define new shared variable ref_pagebreak   like mfc_logical no-undo
                                           label "New Page on Reference".
define new shared variable include_pastdue like mfc_logical
                                           label "Include Past Due"
                                           initial yes no-undo.


/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
   
 RECT-FRAME       AT ROW 1.4 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1   COLUMN 3 NO-LABEL
 SKIP(.1)  /*GUI*/
shipfrom_from   colon 15 label "Ship-From"
   shipfrom_to     colon 45 label {t001.i}
   cust_from       colon 15
   cust_to         colon 45 label {t001.i}
   shipto_from     colon 15
   shipto_to       colon 45 label {t001.i}
   dock_from       colon 15
   dock_to         colon 45 label {t001.i}
   part_from       colon 15
   part_to         colon 45 label {t001.i}
   po_from         colon 15 format "x(22)"
   po_to           colon 45 label {t001.i} format "x(22)"
   custref_from    colon 15 format "x(22)"
   custref_to      colon 45 label {t001.i} format "x(22)"
   modelyr_from    colon 15
   modelyr_to      colon 45 label {t001.i}
   order_from      colon 15
   order_to        colon 45 label {t001.i}
   skip(1)
   due_dt          colon 30
   include_pastdue colon 30
   ref_pagebreak   colon 30
   skip(1)
 SKIP(.4)  /*GUI*/
with frame a side-labels width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER.
 F-a-title = &IF (DEFINED(SELECTION_CRITERIA) = 0)
  &THEN " Selection Criteria "
  &ELSE {&SELECTION_CRITERIA}
  &ENDIF .
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:WIDTH-PIXELS in frame a =
  FONT-TABLE:GET-TEXT-WIDTH-PIXELS(
  RECT-FRAME-LABEL:SCREEN-VALUE in frame a + " ", RECT-FRAME-LABEL:FONT).
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5. /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



/* SET EXTERNAL LABELS */
setFrameLabels(frame a:handle).

due_dt = today.

{wbrp01.i}


/*GUI*/ {mfguirpa.i true "printer" 132 " " " " " "  }

/*GUI repeat  with frame a: */
/*GUI*/ procedure p-enable-ui:

   if shipfrom_to = hi_char then shipfrom_to = "".
   if cust_to     = hi_char then cust_to     = "".
   if shipto_to   = hi_char then shipto_to   = "".
   if dock_to     = hi_char then dock_to     = "".
   if part_to     = hi_char then part_to     = "".
   if po_to       = hi_char then po_to       = "".
   if custref_to  = hi_char then custref_to  = "".
   if modelyr_to  = hi_char then modelyr_to  = "".
   if order_to    = hi_char then order_to    = "".

   if c-application-mode <> 'web' then
   
run p-action-fields (input "display").
run p-action-fields (input "enable").
end procedure. /* p-enable-ui, replacement of Data-Entry GUI*/

/*GUI*/ procedure p-report-quote:


   {wbrp06.i &command = update &fields = " shipfrom_from shipfrom_to
        cust_from cust_to shipto_from shipto_to dock_from dock_to
        part_from part_to po_from po_to custref_from custref_to
        modelyr_from modelyr_to order_from order_to due_dt
        include_pastdue ref_pagebreak " &frm = "a"}

   if (c-application-mode <> 'web') or
      (c-application-mode = 'web' and
      (c-web-request begins 'data')) then do:

      bcdparm = "".
      {mfquoter.i shipfrom_from}
      {mfquoter.i shipfrom_to }
      {mfquoter.i cust_from   }
      {mfquoter.i cust_to     }
      {mfquoter.i shipto_from }
      {mfquoter.i shipto_to   }
      {mfquoter.i dock_from   }
      {mfquoter.i dock_to     }
      {mfquoter.i part_from   }
      {mfquoter.i part_to     }
      {mfquoter.i po_from     }
      {mfquoter.i po_to       }
      {mfquoter.i custref_from}
      {mfquoter.i custref_to  }
      {mfquoter.i modelyr_from}
      {mfquoter.i modelyr_to  }
      {mfquoter.i order_from  }
      {mfquoter.i order_to    }
      {mfquoter.i due_dt      }
      {mfquoter.i include_pastdue}
      {mfquoter.i ref_pagebreak}

      if shipfrom_to = "" then shipfrom_to = hi_char.
      if cust_to     = "" then cust_to     = hi_char.
      if shipto_to   = "" then shipto_to   = hi_char.
      if dock_to     = "" then dock_to     = hi_char.
      if part_to     = "" then part_to     = hi_char.
      if po_to       = "" then po_to       = hi_char.
      if custref_to  = "" then custref_to  = hi_char.
      if modelyr_to  = "" then modelyr_to  = hi_char.
      if order_to    = "" then order_to    = hi_char.

   end.
   /* OUTPUT DESTINATION SELECTION */
   
/*GUI*/ end procedure. /* p-report-quote */
/*GUI - Field Trigger Section */

/*GUI MFSELxxx removed*/
/*GUI*/ procedure p-report:
/*GUI*/   {gpprtrpa.i "printer" 132 " " " " " " " " }
/*GUI*/   mainloop: do on error undo, return error on endkey undo, return error:



   {mfphead2.i}

   if ref_pagebreak then do:
      {gprun.i ""rcrp09a.p""}
   end.
   else do:
      {gprun.i ""rcrp09b.p""}
   end.

   /* REPORT TRAILER */
   
/*GUI*/ {mfguitrl.i} /*Replace mfrtrail*/

/*GUI*/ {mfgrptrm.i} /*Report-to-Window*/

end.
{wbrp04.i &frame-spec = a}

/*GUI*/ end procedure. /*p-report*/
/*GUI*/ {mfguirpb.i &flds=" shipfrom_from shipfrom_to cust_from cust_to shipto_from shipto_to dock_from dock_to part_from part_to po_from po_to custref_from custref_to modelyr_from modelyr_to order_from order_to due_dt include_pastdue ref_pagebreak "} /*Drive the Report*/
